<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org/">
<head>
	<meta charset="UTF-8">
	<title>汽车租赁管理系统</title>
	<link rel="stylesheet" type="text/css" href="../static/layui/css/layui.css"/>
	<script src="../static/layui/layui.js" type="text/javascript" charset="utf-8"></script>
	<style>
		.layui-body {
			position: relative;
			left: 0;
			width: 100%;
			box-sizing: border-box;
		}
		.layui-layout-admin .layui-footer {
			position: fixed;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 990;
			height: 44px;
			line-height: 44px;
			padding: 0 15px;
			box-shadow: -1px 0 4px rgb(0 0 0 / 12%);
			background-color: #fafafa;
		}
		.layui-circle {
			width: 50px;
			height: 50px;
		}
	</style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
	<div class="layui-header">
		<div class="layui-logo layui-hide-xs layui-bg-black">汽车租赁管理系统</div>
		<ul class="layui-nav layui-layout-left">
			<li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
				<i class="layui-icon layui-icon-spread-left"></i>
			</li>
			<li class="layui-nav-item layui-hide-xs">
				<a href="javascript:;"
				   data-url="/user/selectByPageById"
				   class="site-demo-active">个人信息</a>
			</li>
			<li class="layui-nav-item layui-hide-xs">
				<a href="javascript:;"
				   data-url="/car/selectByPage"
				   class="site-demo-active">查看汽车</a>
			</li>
			<li class="layui-nav-item layui-hide-xs">
				<a href="javascript:;"
				   data-url="/rent/selectByPage"
				   class="site-demo-active">租赁订单</a>
			</li>
			<li class="layui-nav-item layui-hide-xs">
				<a href="javascript:;"
				   data-url="/echarts/toEcharts"
				   class="site-demo-active">汽车统计</a>
			</li>
		</ul>
		<ul class="layui-nav layui-layout-right">
			<li class="layui-nav-item">
				<img class="layui-circle" th:src="|/img/${session.user.image}|" style="margin-right: 10px">
				<label th:text="|${session.user?.name}|" style="margin-right: 10px"></label>
			</li>
			<li class="layui-nav-item">
				<a href="javascript:logout()">注销</a>
			</li>
		</ul>
	</div>
	<div class="layui-body"><!-- 内容主体区域 -->
		<iframe name="rightframe" width="100%" height="97%" src="/echarts/toEcharts"></iframe>
	</div>
	<div class="layui-footer">© JAVA - 汽车租赁管理系统</div>
</div>
<script type="text/javascript">
	var $ = layui.jquery;
	var layer = layui.layer;
	var element = layui.element;
	$('.site-demo-active').click(function() {
		window.open($(this).data('url'), "rightframe");
	});
	element.render();// element.init();
	function openURL(url){
		window.open(url, "rightframe");
	}

	function logout() {
		layer.confirm(
				'您确认要退出么',
				{icon:3},
				function() {
					location.href = '/user/logout'
				}
		);
	}
</script>
</body>
</html>
